package com.java.bean;

import com.java.util.DateUtil;

public class BootstrapTableCourier {
    private int id;
    private String name;
    private String phone;
    private String idNumber;
    private String passwd;
    private String dispatches;
    private String regtime;
    private String logintime;
    private String status;
    private String email;
    private String addr;

    public BootstrapTableCourier(Courier courier) {
        if (courier == null) return;
        id = courier.getId();
        name = courier.getName();
        phone = courier.getPhone();
        idNumber = courier.getIdentification();
        passwd = courier.getPassword();
        dispatches = String.valueOf(courier.getDispatches());
        regtime = DateUtil.format(courier.getRegtime());
        logintime = DateUtil.format(courier.getLogintime());
        status = courier.getStatus() == 0 ? "正常" : courier.getStatus() == 1 ? "被删除" : "异常";
        email = courier.getEmail() == null ? "无电子邮箱" : courier.getEmail();
        addr = courier.getAddr() == null ? "暂无数据" : courier.getAddr();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public String getDispatches() {
        return dispatches;
    }

    public void setDispatches(String dispatches) {
        this.dispatches = dispatches;
    }

    public String getRegtime() {
        return regtime;
    }

    public void setRegtime(String regtime) {
        this.regtime = regtime;
    }

    public String getLogintime() {
        return logintime;
    }

    public void setLogintime(String logintime) {
        this.logintime = logintime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }
}
